9cd56baf00e1354157c2c96b9270bbc2a2e3c1ca,src/org/exist/storage/NativeTextEngine.java,NativeTextEngine,getNodesExact,#XQueryContext#DocumentSet#NodeSet#String#,421
Before Change
Match match;
for (Iterator iter = docs.getCollectionIterator(); iter.hasNext();) {
//Compute a key for the node
collection = (Collection) iter.next();
collectionId = collection.getId();
ref = new WordRef(collectionId, token);
Lock lock = dbTokens.getLock();
try {
lock.acquire();
is = dbTokens.getAsStream(ref);
//Does the token already has data in the index ?
if (is == null)
continue;
while (is.available() > 0) {
storedDocId = is.readInt();
storedSection = is.readByte();
gidsCount = is.readInt();
size = is.readFixedInt();
storedDocument = docs.getDoc(storedDocId);
//Exit if the document is not concerned
if (storedDocument == null) {
After Change
final NodeSet result = new ExtArrayNodeSet(docs.getLength(), 250);
for (Iterator iter = docs.getCollectionIterator(); iter.hasNext();) {
//Compute a key for the node
Collection collection = (Collection) iter.next();
short collectionId = collection.getId();
Value ref = new WordRef(collectionId, token);
Lock lock = dbTokens.getLock();
try {
lock.acquire();
VariableByteInput is = dbTokens.getAsStream(ref);
//Does the token already has data in the index ?
if (is == null)
continue;
while (is.available() > 0) {
int storedDocId = is.readInt();
int storedSection = is.readByte();
int gidsCount = is.readInt();
//TOUNDERSTAND -pb
int size = is.readFixedInt();
DocumentImpl storedDocument = docs.getDoc(storedDocId);
//Exit if the document is not concerned
if (storedDocument == null) {